import request from '@/utils/request'

const BASE = `/api/hosp/hospital`;

export default {
    // 查询医院列表
    getPageList(page, limit, searchObj) {
        return request({
            url: `${BASE}/findHospList/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    // 根据医院名称模糊查询
    getByHosname(hosname) {
        return request({
            url: `${BASE}/findByHosname/${hosname}`,
            method: 'get',
        })
    },
    // 根据医院编号查询医院详细信息
    show(hoscode) {
        return request({
            url: `${BASE}/findHospDetail/${hoscode}`,
            method: 'get'
        })
    },
    // 根据医院标号查询科室
    findDepartment(hoscode) {
        return request({
            url: `${BASE}/department/${hoscode}`,
            method: 'get'
        })
    },

    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${BASE}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },

    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${BASE}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    getSchedule(id) {
        return request({
            url: `${BASE}/getSchedule/${id}`,
            method: 'get'
        })
    },


}